home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / video / seqgrab / vlan.h < prev   
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.4 KB  |  87 lines

  1. /*
  2.  * Copyright (C) 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. /*
  18.     vlan.h - Routines to help talk to VLAN network.
  19.     
  20.     Tim Heidmann
  21.     Created     March  1, 1993
  22.     Last Edit   Oct   22, 1993
  23. */
  24.  
  25. #ifndef TRUE
  26. #define TRUE 1L
  27. #endif
  28. #ifndef FALSE
  29. #define FALSE 0L
  30. #endif
  31.  
  32. #include <sys/time.h>
  33.  
  34. /* VLAN error codes, in vlan_errno */
  35. #define VLAN_CANT_OPEN        1
  36. #define VLAN_TCGETA           2
  37. #define VLAN_TCSETA           3
  38. #define VLAN_PARSE_TIMECODE   4
  39. #define VLAN_BAD_TIMEOUT      5
  40. #define VLAN_READ_COINCIDENCE 6
  41. #define VLAN_TIMEOUT          7
  42. #define VLAN_CAPTURE_DEAD     8
  43.  
  44. typedef struct {
  45.     union {
  46.     struct {
  47.         unsigned char esc, type, nBytes;    /* 1-3             */
  48.     } generic;
  49.  
  50.     struct {
  51.         unsigned char esc, type, nBytes;    /* 1-3             */
  52.         unsigned mType : 3, node : 5;    /* 4    body 1     */
  53.         unsigned char f0, f1, f2;        /* 5-7  body 2-4   */
  54.         unsigned char se;            /* 8    body 5     */
  55.         unsigned code : 2,
  56.              byte7type : 2,
  57.              locked : 1,
  58.              varSpeed : 1,
  59.              dropFrame : 1,
  60.              tcValid : 1;        /* 9    body 6     */
  61.         unsigned char byte7;        /* 10   body 7     */
  62.         unsigned : 4,
  63.              idChanged : 1,
  64.              mediaChanged : 1,
  65.              searchCompleted : 1,
  66.              editCompleted : 1;        /* 11   body 8     */
  67.         unsigned : 8;            /* 12   pad to 12  */
  68.     } status;
  69.     } u;
  70. } vlan_esc_struct;
  71.  
  72.  
  73. extern int vlan_sending, vlan_receiving, vlan_debug, vlan_errno;
  74. extern char vlan_port[];
  75.  
  76. extern int vlan_InitPort();
  77. extern char * vlan_SendCmd(char c[]);
  78. extern int vlan_Coincidence(int ds, char *ch);
  79.  
  80. extern char *vlan_FtoTC(int iFrame);
  81. extern int vlan_TCtoF(char *tc);
  82. extern char *vlan_neatTC(char *tc);
  83.  
  84. extern void vlan_perror(char *str);
  85. void vlan_Send(char c[]);
  86. int vlan_Recv(char **c, vlan_esc_struct **e, struct timeval *ts);
  87.